﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using GS.CMS.Entities;

public partial class _default : System.Web.UI.Page
{
    Products _Products = new Products();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            BindDataProducts();
    }
    private void BindDataProducts()
    {
        try
        {
            DataSet dsStatusProduct = null;
            //dsFunction = this.Context.Cache["dsFunction"] as DataSet;
            if (dsStatusProduct == null)
            {
                dsStatusProduct = _Products.GetListUpcomingAndNewProducts();
                //this.Context.Cache.Insert("dsFunction", dsFunction, null, DateTime.Now.AddMinutes(5), TimeSpan.Zero, CacheItemPriority.Default, null);
            }
            _UpcommingProducts.UpcommingProduct = dsStatusProduct.Tables[0];
            _NewProducts.NewProduct = dsStatusProduct.Tables[1];

        }
        catch (Exception)
        {

        }
    }
}